<template>
  <div class="mystar">
    <hmheader title="我的收藏">
      <template #left>
        <van-icon name="arrow-left" @click="$router.go(-1)" />
      </template>
    </hmheader>

    <van-swipe-cell v-for="value in starList" :key="value.id">
      <hmpostBlock :post="value"></hmpostBlock>

      <template #right>
        <van-button
          square
          text="删除"
          type="danger"
          class="delete-button"
          style="height: 100%"
        />
      </template>
    </van-swipe-cell>
  </div>
</template>

<script>
import hmheader from "@/components/hmheader.vue";
import hmpostBlock from "@/components/hmpostBlock.vue";
import { getUserStars } from "@/apis/user.js";
export default {
  components: {
    hmheader,
    hmpostBlock,
  },
  data() {
    return {
      starList: [],
    };
  },
  async mounted() {
    let res = await getUserStars();
    console.log(res);
    this.starList = res.data.data;
  },
};
</script>

<style>
</style>